home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / graphics / mfpic / alfatest / mfpic.tex < prev    next >
Text File  |  1994-08-11  |  15KB  |  545 lines

  1. %%%
  2. %%%  File: mfpic.tex
  3. %%%
  4. % preliminary version of macros.
  5. \chardef\oldatcatcode=\catcode`@
  6. \catcode`@=11
  7. \immediate\write16
  8.   {mfpic version 0.2.9 alpha  Thu 11 August 1994}
  9. % local declarations:
  10. \wlog {mfpic: local declarations}
  11. \newwrite\@outx
  12. \newread\@graphx
  13. \newcount\@gcode
  14. \newbox\@labeledgraph
  15. \newbox\@temp
  16. \wlog {mfpic: internal dimension parameters}
  17. \newdimen\@graphwd
  18. \newdimen\@graphleft
  19. \newdimen\@graphht
  20. \newdimen\@graphdp
  21. \newdimen\@centerskip
  22. \newdimen\@labeltemp
  23. \def\do@ptparam#1#2{%
  24.   \def\@ptparami[##1]{\csname#1\endcsname[##1]}%
  25.   \def\@ptparamii{\csname#1\endcsname[#2]}%
  26.   \def\@ptparamiii{%
  27.     \ifx[\nchr \expandafter\@ptparami
  28.     \else \expandafter\@ptparamii\fi}%
  29.   \futurelet\nchr\@ptparamiii}
  30. % dimension parameters:
  31. \wlog {mfpic: user's dimension parameters}
  32. \newdimen\mfpicunit
  33. \mfpicunit=1pt
  34. \newdimen\pointsize
  35. \newif\ifpointfilled\pointfilledtrue
  36. \newdimen\shadespace
  37. \newdimen\hatchspace
  38. \newdimen\headlen
  39. \newdimen\axisheadlen
  40. \newdimen\hashlen
  41. \newdimen\dashlen
  42. \newdimen\dashspace
  43. % default settings:
  44. \pointsize=2pt
  45. \shadespace=1pt
  46. \hatchspace=3pt
  47. \headlen=3pt
  48. \axisheadlen=5pt
  49. \hashlen=4pt
  50. \dashlen=4pt
  51. \dashspace=4pt
  52. % standard setting macros:
  53. \def\darkershade{%
  54.   \multiply\shadespace by 5
  55.   \divide\shadespace by 6}
  56. \def\lightershade{%
  57.   \multiply\shadespace by 6
  58.   \divide\shadespace by 5}
  59. \def\dashlineset{%
  60.   \dashlen=4pt
  61.   \dashspace=4pt}
  62. \def\dotlineset{%
  63.   \dashlen=1pt
  64.   \dashspace=2pt}
  65. % direct output to Metafont file:
  66. \def\mfcmd#1{%
  67.   \immediate\write\@outx{#1}%
  68.   \ignorespaces}
  69. % pen size setting:
  70. \def\@pickup{%
  71.   \mfcmd{pickup pencircle scaled penwd;}}
  72. \def\pen#1{%
  73.   \mfcmd{interim penwd:=#1;}
  74.   \@pickup}
  75. % arrowhead shape setting:
  76. \def\headshape#1#2#3{%
  77.   \mfcmd{%
  78.     interim hdwdr:=#1;
  79.     interim hdten:=#2;
  80.     hfilled:=#3;}}
  81. % Prefix commands:
  82. % routines to select drawing (of paths) :
  83. \newif\if@drawing\@drawingtrue
  84. \newif\if@path\@pathfalse
  85. \newif\if@dodraw\@dodrawtrue
  86. \newif\if@connect\@connectfalse
  87. \newif\if@doconnect\@doconnectfalse
  88. \def\@doreset{%
  89.   \@dodrawtrue
  90.   \if@connect
  91.      \@drawingfalse
  92.      \@pathtrue
  93.      \@doconnecttrue
  94.   \else
  95.      \@drawingtrue
  96.      \@pathfalse
  97.      \@doconnectfalse
  98.    \fi
  99.   \ignorespaces}
  100. \def\@checkpath#1#2{%
  101.   \if@drawing
  102.     \if@path
  103.       \mfcmd{#1}%
  104.     \else
  105.       \mfcmd{#2}%
  106.     \fi
  107.   \fi}
  108. \def\@draw#1{%
  109.   \@checkpath{drawnpath}{safedraw}%
  110.   \mfcmd{\if@connect\else ( \fi
  111.     \if@doconnect transformed ztr)--( \fi #1
  112.     \if@connect \else ) transformed ztr; \fi}%
  113.   \@doreset}
  114. % store following mfpic path in MF path variable #1:
  115. \def\store#1{\@mfcmd{path #1; #1:=}\@drawingfalse}
  116. % shading, hatching, filling, and erasing:
  117. \def\@shade[#1]{\mfcmd{shadepath(#1)}\@drawingfalse}
  118. \def\shade{\do@ptparam{@shade}{\the\shadespace}}
  119. \def\@hatch[#1]{\mfcmd{hatchpath(#1)}\@drawingfalse}
  120. \def\hatch{\do@ptparam{@hatch}{\the\hatchspace}}
  121. \def\fill{\mfcmd{safefill}\@drawingfalse}
  122. \def\white{\mfcmd{safeunfill}\@drawingfalse}
  123. % arrowheads:
  124. \def\@arrow{%
  125.   \@checkpath{}{trash:=}%
  126.   \mfcmd{headpath(\@hlength,\@hrotate,\@hbackset)}%
  127.   \@pathtrue}
  128. \def\@checkchar#1#2{%
  129.   \ifx#1l\gdef\@hlength{#2}\else
  130.   \ifx#1r\gdef\@hrotate{#2}\else
  131.   \ifx#1b\gdef\@hbackset{#2}\fi\fi\fi}
  132. \def\@arrowthree[#1#2]{\@checkchar{#1}{#2}\@arrow}
  133. \def\@arrowtwo[#1#2]{%
  134.   \@checkchar{#1}{#2}%
  135.   \do@ptparam{@arrowthree}{WW}}
  136. \def\@arrowone[#1#2]{%
  137.   \gdef\@hlength{\the\headlen}%
  138.   \gdef\@hrotate{0}%
  139.   \gdef\@hbackset{0pt}%
  140.   \@checkchar{#1}{#2}%
  141.   \do@ptparam{@arrowtwo}{ZZ}}
  142. \def\arrow{\do@ptparam{@arrowone}{YY}}
  143. % outline, dotted lines, and closed paths:
  144. \def\draw{%
  145.   \if@dodraw\@checkpath{}{trash:=}%
  146.     \mfcmd{drawnpath}\fi
  147.   \@drawingfalse\@dodrawfalse}
  148. \def\@dotted[#1,#2]{%
  149.   \if@dodraw\@checkpath{}{trash:=}%
  150.     \mfcmd{dotted(#1,#2)}\fi
  151.   \@drawingfalse\@dodrawfalse}
  152. \def\dotted{%
  153.   \do@ptparam{@dotted}%
  154.     {\the\dashlen,\the\dashspace}}
  155. \def\closed{\@checkpath{drawnpath}{safedraw}%
  156.   \mfcmd{closedpath}%
  157.   \@pathtrue
  158.   \if@drawing\@dodrawfalse\fi
  159.   \@drawingfalse}
  160. \def\bclosed{\@checkpath{drawnpath}{safedraw}%
  161.   \mfcmd{bclosedpath}%
  162.   \@pathtrue
  163.   \if@drawing\@dodrawfalse\fi
  164.   \@drawingfalse}
  165. \def\sclosed{\@checkpath{drawnpath}{safedraw}%
  166.   \mfcmd{sclosedpath}%
  167.   \@pathtrue
  168.   \if@drawing\@dodrawfalse\fi
  169.   \@drawingfalse}
  170. \def\cbclosed{\@checkpath{drawnpath}{safedraw}%
  171.   \mfcmd{cbclosedpath}%
  172.   \@pathtrue
  173.   \if@drawing\@dodrawfalse\fi
  174.   \@drawingfalse}
  175. % reversing orientation of paths:
  176. \def\reverse{\@checkpath{drawnpath}{safedraw}%
  177.   \mfcmd{\if@doconnect transformed ztr)--(\fi reverse}%
  178.   \@doconnectfalse
  179.   \@pathtrue
  180.   \if@drawing\@dodrawfalse\fi
  181.   \@drawingfalse}
  182. % connecting open figures:
  183. \def\connect{\@checkpath{drawnpath}{safedraw}%
  184.   \mfcmd{(}%
  185.   \bgroup
  186.     \@connecttrue\@doconnectfalse
  187.     \if@drawing\@dodrawfalse\fi
  188.     \@drawingfalse}
  189. \def\endconnect{%
  190.     \mfcmd{) transformed ztr;}%
  191.     \@doconnectfalse\@connectfalse
  192.   \egroup
  193.   \@doreset}
  194. % rotating a path:
  195. \def\rotate#1{%
  196.   \@checkpath{drawnpath}{safedraw}%
  197.   \mfcmd{rotatedpath(#1)}%
  198.   \@pathtrue
  199.   \if@drawing\@dodrawfalse\fi
  200.   \@drawingfalse}
  201. % Affine transforms of the MF _coordinate system_ :
  202. % grouping macros that enable nested coordinate systems:
  203. \def\coords{\mfcmd{bcoords;}}%
  204. \def\endcoords{\mfcmd{ecoords;}}%
  205. % macro that applies a nominated MF affine transformer:
  206. \def\applyT#1{\mfcmd{apply_t(#1);}}%
  207. % specific transform macros for MF coordinates;
  208. % see _The METAFONTbook_ for most of these.
  209. \def\rotates#1{\applyT{rotated #1}}%  degrees
  210. \def\rotatesaround#1#2{\applyT{rotatedaround(#1,#2)}}%  point, degrees.
  211. \def\reflectsabout#1#2{\applyT{reflectedabout(#1,#2)}}%  line #1 -- #2.
  212. \def\shifts#1{\applyT{shifted #1}}%  pair.
  213. \def\scales#1{\applyT{scaled #1}}%  same scaling in X and Y directions.
  214. \def\xscales#1{\applyT{xscaled #1}}%  scale only X.
  215. \def\yscales#1{\applyT{yscaled #1}}%  scale only Y.
  216. \def\zscales#1{\applyT{zscaled #1}}%  complex multiplication of points.
  217. \def\xslants#1{\applyT{xslanted #1}}%  skew in X direction by a multiple of Y coord.
  218. \def\yslants#1{\applyT{yslanted #1}}%  skew in Y direction by a multiple of X coord.
  219. \def\zslants#1{\applyT{zslanted #1}}%  see `graphbase.mf'.
  220. \def\xyswaps#1{\applyT{xyswapped #1}}%  reflect in line Y=X.
  221. \def\boosts#1{\applyT{boosted #1}}%  special relativity boost.
  222. % end Prefix commands.
  223. % open and close MF graphs file:
  224. \def\opengraphsfile#1{%
  225.   \@gcode=0
  226.   \immediate\openout\@outx=#1.mf
  227.   \openin\@graphx=#1.tfm
  228.   \ifeof\@graphx
  229.     \immediate\write16
  230.       {No file #1.tfm.}%
  231.     \font\@graph=dummy\relax
  232.   \else
  233.     \font\@graph=#1\relax
  234.   \fi
  235.   \closein\@graphx
  236.   \immediate\write16
  237.     {mfpic: Don't forget to process #1.mf!}%
  238.   \immediate\write16
  239.     { Then reprocess this file.}%
  240.   \mfcmd{if unknown mode: mode:= localfont; fi}%
  241.   \mfcmd{if unknown mag: mag:=\number\mag/1000; fi}%
  242.   \mfcmd{if unknown graphbase: input graphbase; fi}%
  243.   \mfcmd{gcode:=\number\@gcode;}%
  244.   % set global defaults:
  245.   \headshape{1}{1}{false}%
  246.   \mfcmd{interim penwd:=0.5pt;}%
  247.   \mfcmd{}}
  248. \def\closegraphsfile{%
  249.   \mfcmd{}%
  250.   \mfcmd{end.}%
  251.   \immediate\closeout\@outx}
  252. % percent and sharp signs for MF file:
  253. \def\mf@gobble#1{}
  254. \def\mf@p{\expandafter\mf@gobble\string\%}
  255. \def\mf@s{\expandafter\mf@gobble\string\#}
  256. % for reading \@mfpic:
  257. \global\font\@tcurr=\fontname\font\relax
  258. \nullfont
  259. % beginning mfpic environment:
  260. \def\@mfpic#1#2#3#4#5#6%
  261. {%
  262.  % set up TeX
  263.  \leavevmode
  264.  \bgroup
  265.   \parfillskip0pt plus1fill
  266.   % conversion (local) :
  267.   \def\@xconv##1{%
  268.     \global\advance##1 by -#3\mfpicunit
  269.     \global ##1 = #1 ##1}%
  270.   \def\@yconv##1{%
  271.     \global\advance##1 by -#5\mfpicunit
  272.     \global ##1 = -#2 ##1}%
  273.   % set up graph box:
  274.   \global\advance\@gcode1
  275.   \global\@graphwd=#4\mfpicunit
  276.   \@xconv\@graphwd
  277.   \@graphht=#6\mfpicunit
  278.   \@yconv\@graphht
  279.   \@graphleft=0pt
  280.   \@graphdp=0pt
  281.   \global\setbox\@labeledgraph=
  282.     \vtop{\noindent\@graph\char\@gcode}%
  283.   % set up Metafont file:
  284.   \mfcmd{}%
  285.   \mfcmd{unitlen:=\the\mfpicunit\mf@s;}%
  286.   \mfcmd{xscale:=#1*unitlen; yscale:=#2*unitlen;}%
  287.   \mfcmd{xneg:=#3; xpos:=#4;}%
  288.   \mfcmd{yneg:=#5; ypos:=#6;}%
  289.   \mfcmd{beginchar
  290.     (incr gcode,
  291.      (xpos-xneg)*xscale,
  292.      (ypos-yneg)*yscale,
  293.      0);}%
  294.   \mfcmd{initpic;}%
  295.   % the (MF based) drawing macros:
  296.   % Metafont title
  297.   \def\mftitle##1{%
  298.     \mfcmd{"##1";}}
  299.   % allow MF path ##1 to be shaded, connected, etc:
  300.   \def\mfobj##1{\@draw{##1}}%
  301.   % axes and axis Marks:
  302.   \def\@axes[##1]{%
  303.     \mfcmd{axes(##1);}\@doreset}%
  304.   \def\axes{\do@ptparam{@axes}{\the\axisheadlen}}%
  305.   \def\@xmarks[##1]##2{%
  306.     \mfcmd{xmarks(##1,##2);}\@doreset}%
  307.   \def\xmarks{\do@ptparam{@xmarks}{\the\hashlen}}%
  308.   \def\@ymarks[##1]##2{%
  309.     \mfcmd{ymarks(##1,##2);}\@doreset}%
  310.   \def\ymarks{\do@ptparam{@ymarks}{\the\hashlen}}%
  311.   % points:
  312.   \def\@point[##1]##2{%
  313.     \if@connect
  314.       \lines{##2}%
  315.     \else
  316.       \mfcmd{pointd(##1,\ifpointfilled true\else false\fi,##2);}%
  317.     \fi
  318.     \@doreset}%
  319.   \def\point{\do@ptparam{@point}{\the\pointsize}}%
  320.   % polylines:
  321.   \def\lines##1{%
  322.     \@draw{(curve(false, false) ##1)}}%
  323.   % curves:
  324.   \def\curve##1{%
  325.     \@draw{(curve(true,false) ##1)}}%
  326.   % cyclic curves:
  327.   \def\cyclic##1{%
  328.     \@draw{(curve(true,true) ##1)}}%
  329.   % open quadratic B-splines
  330.   \def\qspline##1{%
  331.     \@draw{openqbs(##1)}}
  332.   % closed quadratic B-splines
  333.   \def\closedqspline##1{%
  334.     \@draw{closedqbs(##1)}}
  335.   % open cubic B-splines
  336.   \def\cspline##1{%
  337.     \@draw{opencbs(##1)}}
  338.   % closed cubic B-splines
  339.   \def\closedcspline##1{%
  340.     \@draw{closedcbs(##1)}}
  341.   % upright rectangles:
  342.   \def\rect##1{%
  343.     \@draw{rect(##1)}}%
  344.   % circles and ellipses:
  345.   \def\circle##1{%%
  346.     \@draw{circle(##1)}}%
  347.   \def\@ellipse[##1]##2{%
  348.     \@draw{ellipse(##2,##1)}}%
  349.   \def\ellipse{\do@ptparam{@ellipse}{0}}%
  350.   % circular arcs:
  351.   \def\@arc[##1]##2{%
  352.     \if##1s\@draw{(arcpps(##2))}\else
  353.     \if##1p\@draw{(arcplr(##2))}\else
  354.     \if##1c\@draw{(arccps(##2))}\else
  355.       \@draw{(arcppp(##2))}\fi\fi\fi}%
  356.   \def\arc{\do@ptparam{@arc}{s}}%
  357.   % polar coordinates:
  358.   \def\@plrpoint[##1]##2{%
  359.     \if@connect
  360.       \plrlines{##2}%
  361.     \else
  362.       \mfcmd{plrpointd(##1,%
  363.         \ifpointfilled true\else false\fi,%
  364.         ##2);}%
  365.     \fi
  366.     \@doreset}%
  367.   \def\plrpoint{\do@ptparam{@plrpoint}{\the\pointsize}}%
  368.   \def\plrlines##1{%
  369.     \@draw{(plrcurve(false,false) ##1)}}%
  370.   \def\plrcurve##1{%
  371.     \@draw{(plrcurve(true,false) ##1)}}%
  372.   \def\plrcyclic##1{%
  373.     \@draw{(plrcurve(true,true) ##1)}}%
  374.   % modified polar coordinates:
  375.   \def\turtle##1{%
  376.     \@draw{(turtle(##1))}}%
  377.   \def\wedge##1{%
  378.     \@draw{(wedge(##1))}}%
  379.   % functions:
  380.   \def\@function[##1]##2##3{%
  381.     \@draw{(function(%%
  382.       \if##1s true\else false\fi, ##2, ##3))}}%
  383.   \def\function{\do@ptparam{@function}{s}}%
  384.   \def\@parafcn[##1]##2##3{%
  385.     \@draw{(parafcn(
  386.       \if##1s true\else false\fi, ##2, ##3))}}%
  387.   \def\parafcn{\do@ptparam{@parafcn}{s}}%
  388.   \def\@plrfcn[##1]##2##3{%
  389.     \@draw{(plrfcn(
  390.       \if##1s true\else false\fi, ##2, ##3))}}%
  391.   \def\plrfcn{\do@ptparam{@plrfcn}{s}}%
  392.   \def\@btwnfcn[##1]##2##3##4{%
  393.     \@draw{((function(
  394.       \if##1s true\else false\fi, ##2, ##3))
  395.       --(reverse function(
  396.       \if##1s true\else false\fi, ##2, ##4))
  397.       --cycle)}}%
  398.   \def\btwnfcn{\do@ptparam{@btwnfcn}{p}}%
  399.   \def\@plrregion[##1]##2##3{%
  400.     \@draw{(plrfcn(
  401.       \if##1s true\else false\fi, ##2, ##3)
  402.       --(0,0)--cycle)}}%
  403.   \def\plrregion{\do@ptparam{@plrregion}{p}}%
  404.   % end of (MF based) drawing macros.
  405.   % (TeX based) labels and caption:
  406.   % Labels:
  407.   \def\@label[##1##2](##3,##4)##5{%
  408.     % compute width of graph with label,
  409.     % and reset size if necessary:
  410.     \setbox\@temp=\hbox{##5}%
  411.     % stretch graph rightwards:
  412.     \@labeltemp=##3\mfpicunit
  413.     \@xconv\@labeltemp
  414.     \if##2l\advance\@labeltemp by \wd\@temp\else
  415.     \if##2c\advance\@labeltemp by 0.5\wd\@temp\fi\fi
  416.     \ifdim\@labeltemp>\@graphwd
  417.       \global\@graphwd=\@labeltemp\fi
  418.     % stretch graph leftwards:
  419.     \@labeltemp=##3\mfpicunit
  420.     \@xconv\@labeltemp
  421.     \if##2r\advance\@labeltemp by -\wd\@temp\else
  422.     \if##2c\advance\@labeltemp by -0.5\wd\@temp\fi\fi
  423.     \ifdim\@labeltemp<\@graphleft
  424.       \global\@graphleft=\@labeltemp\fi
  425.     % stretch graph upwards:
  426.     \@labeltemp=##4\mfpicunit
  427.     \@yconv\@labeltemp
  428.     \if##1b\advance\@labeltemp by \ht\@temp\else
  429.     \if##1c\advance\@labeltemp by 0.5\ht\@temp\fi\fi
  430.     \ifdim\@labeltemp>\@graphht
  431.       \global\@graphht=\@labeltemp\fi
  432.     % stretch graph downwards:
  433.     \@labeltemp=##4\mfpicunit
  434.     \@yconv\@labeltemp
  435.     \if##1t\advance\@labeltemp by -\dp\@temp\else
  436.     \if##1c\advance\@labeltemp by -0.5\dp\@temp\fi\fi
  437.     \ifdim\@labeltemp<\@graphdp
  438.       \global\@graphdp=\@labeltemp\fi
  439.     % set label onto picture:
  440.     \global\setbox\@labeledgraph =
  441.       \vtop{\unvbox\@labeledgraph
  442.         \vbox to0pt{%
  443.           \if##1c\kern-0.5\ht\@temp\else
  444.           \if##1b\kern-\ht\@temp\fi\fi
  445.           \@labeltemp=##4\mfpicunit
  446.           \@yconv\@labeltemp
  447.           \kern\@labeltemp
  448.           \hbox{%
  449.             \@labeltemp=##3\mfpicunit
  450.             \@xconv\@labeltemp
  451.             \kern\@labeltemp
  452.             \if##2c\kern-0.5\wd\@temp\else
  453.             \if##2r\kern-\wd\@temp\fi\fi
  454.             \box\@temp}%
  455.           \vss}%
  456.         \nointerlineskip}%
  457.     \ignorespaces
  458.   }% -- end \@label
  459.   \def\label{\do@ptparam{@label}{bl}}%
  460.   % Caption:
  461.   % \@docaption (called by \endmfpic) :
  462.   \def\@docaption{\global\@graphleft=0pt\relax}%
  463.   \def\@caption[##1,##2]##3%
  464.   {%
  465.     % redefine \@docaption to set caption:
  466.     \def\@docaption
  467.     {%
  468.       % compute adjustments to center:
  469.       \setbox\@temp =
  470.         \hbox\bgroup ##3\egroup
  471.       \ifdim\wd\@temp>##1\@graphwd
  472.         \setbox\@temp =
  473.           \hbox
  474.           \bgroup
  475.             \tolerance=500\relax
  476.             \vbox{%
  477.               \hsize=##2\@graphwd
  478.               \noindent ##3}%
  479.           \egroup
  480.       \fi
  481.       \@centerskip=\@graphwd
  482.       \advance\@centerskip -\wd\@temp
  483.       \divide\@centerskip by 2
  484.       % set caption onto picture:
  485.       \global\setbox\@labeledgraph =
  486.         \vbox{%
  487.           % check if caption's wider than graph:
  488.           \ifdim\@centerskip<0pt%
  489.             \@graphleft = -\@centerskip
  490.             \moveright -\@centerskip\fi
  491.             \vbox
  492.             \bgroup
  493.               \unvbox\@labeledgraph
  494.               \medskip
  495.               \hbox{%
  496.                 \noindent
  497.                 \kern\@centerskip
  498.                 \box\@temp}%
  499.             \egroup
  500.             \vss}%
  501.     }% -- end \@docaption.
  502.   \ignorespaces
  503.   }% -- end \@caption.
  504.   \def\caption{\do@ptparam{@caption}{1.2,1.0}}%
  505.   % end of object macros.
  506.   \ignorespaces
  507. }% -- end \@mfpic.
  508. % restore font after reading \@mfpic.
  509. \@tcurr
  510. % setting up optional arguments:
  511. \def\@pici[#1]#2#3#4#5{\@mfpic{\@param}{#1}{#2}{#3}{#4}{#5}}
  512. \def\mfpic[#1]{%
  513.   \def\@param{#1}%
  514.   \do@ptparam{@pici}{#1}}
  515. % ending mfpic environment:
  516. \def\endmfpic{%
  517.   \global\advance\@graphwd by -\@graphleft
  518.   \global\setbox\@labeledgraph =
  519.     \vbox
  520.     {%
  521.       \hbox to \@graphwd
  522.       {%
  523.         \kern-\@graphleft
  524.         \box\@labeledgraph
  525.         % \vrule height\@graphht depth-\@graphdp width 0pt
  526.         \hss
  527.       }% end hbox.
  528.       \vss
  529.     }% end vbox.
  530.   \mfcmd{endchar;}%
  531.   \@docaption
  532.   \advance\@graphwd by \@graphleft
  533.   \hbox to\@graphwd
  534.   {%
  535.     \kern\@graphleft
  536.     \box\@labeledgraph
  537.     \hss
  538.   }% end hbox.
  539.   \egroup
  540. }% -- end \endmfpic.
  541. \catcode`@=\oldatcatcode
  542. %%%
  543. %%%  end  mfpic.tex
  544. %%%
  545.